<template>
  <div class="banner">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item v-for="item in banner" :key="item.id"
        ><a :href="item.url"><img :src="item.img.url" /></a
      ></van-swipe-item>
    </van-swipe>
  </div>
</template>

<script setup>
import { defineProps } from "vue";
defineProps(["banner"]);
// console.log(banner);
</script>

<style scoped>
.banner {
  width: 100%;
  padding: 0.3rem;
  box-sizing: border-box;
  margin-top: 44px;
}
img {
  width: 100%;
  height: 100%;
}
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  /* line-height: 150px; */
  width: 100%;
  height: 100%;
  text-align: center;
  border-radius: 5px;
}
</style>
